describe('mainController unit tests.', function(){
    var rootScopeFake, mainServiceFake;
    var mainController;

    beforeEach(angular.mock.module('myApp'));

    beforeEach(angular.mock.inject(function($rootScope, mainService){
        rootScopeFake = $rootScope.$new();
        mainServiceFake = mainService;
    }));

    it('Should call mainService.GetMessage() when mainController is loaded.', function(){
        spyOn(mainServiceFake, 'GetMessage');
        mainController = new MainFeature.MainController(rootScopeFake, mainServiceFake);
        expect(mainServiceFake.GetMessage).toHaveBeenCalled();
    });
});